#!/bin/bash
# pip 方式安装
mkdir -p ~/.pip
sudo cat >~/.pip/pip.conf<<EOF
[global]
timeout = 6000
index-url = http://pypi.douban.com/simple
trusted-host = pypi.douban.com
EOF

yum -y install epel-release
yum -y install python3-pip
# yum -y install python-devel python-subprocess32 

#安装docker-compose
pip3 install -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com --upgrade pip
pip3 install docker-compose -i http://pypi.douban.com/simple  --trusted-host pypi.douban.com
#查看版本
pip3 --version
docker-compose version

# 模版
# version: '3'
# services:
#    db:
#      image: mysql:5.7
#      volumes:
#        - db_data:/var/lib/mysql
#      restart: always
#      environment:
#        MYSQL_ROOT_PASSWORD: root
#        MYSQL_DATABASE: wordpress
#        MYSQL_USER: wordpress
#        MYSQL_PASSWORD: wordpress
#    wordpress:
#      depends_on:
#        - db
#      image: wordpress:latest
#      volumes:
#         - wp_site:/var/www/html
#      ports:
#        - "80:80"
#        - "443:443"
#      restart: always
#      environment:
#        WORDPRESS_DB_HOST: db:3306
#        WORDPRESS_DB_USER: wordpress
#        WORDPRESS_DB_PASSWORD: wordpress
# volumes:
#     db_data:
#     wp_site:

